<div class="widgets">
    <ba-card title="">
        <div class="form col-sm-11">
            <div class="form-group row">
                <div class="col-sm-6">
                    <div class="input-group">
                        <span class="input-group-addon" id="sizing-addon2"><i class="fa fa-search"></i>搜索</span>
                        <input type="text" class="form-control" placeholder="search" aria-describedby="sizing-addon2" [(ngModel)]="searchText">
                    </div>
                </div>
            </div>
        </div>

        <div>
            <button class="btn btn-primary" (click)="onNew()">新增</button>
        </div>
    </ba-card>

    <ba-card title="">
        <carrier-detail [carrier]="selectedCarrier" (onVoted)="getCarriers()"></carrier-detail>
    </ba-card>

    <ba-card title="承运商列表">
        <table class="table table-bordered table-hover">
            <thead>
                <th>ID</th>
                <th>承运商名称</th>
                <th>地址</th>
                <th>联系人</th>
                <th>联系电话</th>
                <th>是否有效</th>
            </thead>
            <tbody>
                <tr *ngFor="let carrier of carriers" [class.selected]="carrier === selectedCarrier" (click)="onSelect(carrier)">
                    <td>
                        <span class="badge">{{carrier.carrier_id}}</span></td>
                    <td>{{carrier.carrier_name}} </td>
                    <td>{{carrier.address}}</td>
                    <td>{{carrier.contact_name}}</td>
                    <td>{{carrier.contact_mobile}}</td>
                    <td>{{carrier.status}}</td>
                </tr>
            </tbody>
        </table>
    </ba-card>
